package com.edu.bean;


import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Past;
import java.util.Date;

public class Book {
    private int bookId;
    private String bookName;
    private String bookWriter;
    private String bookType;
    @Past
    @DateTimeFormat(pattern = "yyyy-MM-dd",fallbackPatterns = {"yyyy/MM/dd","yyyy\\MM\\dd","yyyy年MM月dd日"})
    private Date putDate;
    private String StrDate;

    public String getStrDate() {
        return StrDate;
    }

    public void setStrDate(String strDate) {
        StrDate = strDate;
    }

    public Date getPutDate() {
        return putDate;
    }

    public void setPutDate(Date putDate) {
        this.putDate = putDate;
    }

    public int getBookId() {
        return bookId;
    }

    public void setBookId(int bookId) {
        this.bookId = bookId;
    }

    public String getBookName() {
        return bookName;
    }

    public void setBookName(String bookName) {
        this.bookName = bookName;
    }

    public String getBookWriter() {
        return bookWriter;
    }

    public void setBookWriter(String bookWriter) {
        this.bookWriter = bookWriter;
    }

    public String getBookType() {
        return bookType;
    }

    public void setBookType(String bookType) {
        this.bookType = bookType;
    }

    public Book() {
    }

    public Book(String bookName, String bookWriter, String bookType, Date putDate) {
        this.bookName = bookName;
        this.bookWriter = bookWriter;
        this.bookType = bookType;
        this.putDate = putDate;
    }

    @Override
    public String toString() {
        return "Book{" +
                "bookId=" + bookId +
                ", bookName='" + bookName + '\'' +
                ", bookWriter='" + bookWriter + '\'' +
                ", bookType='" + bookType + '\'' +
                ", putDate=" + putDate +
                '}';
    }
}
